<template>
  <div class="flex flex-col h-screen ">
    <textarea class="flex-1" v-model="token" />
    <van-button @click="saveToken">set token</van-button>
  </div>
</template>

<script>
import { getToken, setToken } from "@/utils/LoginMgr";

export default {
  name: "PageTest",
  created() {
    let token = this.$route.query.token;
    if (token != null && token !== "") {
      setToken(token);
    }
    this.token = getToken();
  },
  data() {
    return {
      token: ""
    };
  },
  methods: {
    saveToken() {
      setToken(this.token);
    }
  }
};
</script>

<style scoped></style>
